﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media;
using System.Windows.Shapes;
using System.Windows.Controls;

namespace SwarmMappingAlpha
{
    public class Drones
    {
        int heightOfRR;
        public Drones()
        {
            heightOfRR = RRController.dimension.height;
        }

        public int cog_y
        {
            get;
            set;
        }

        public int cog_x
        {
            get;
            set;
        }

        public int width
        {
            get;
            set;
        }

        public int height
        {
            get;
            set;
        }

        public int R
        {
            get;
            set;
        }

        public int G
        {
            get;
            set;
        }

        public int B
        {
            get;
            set;
        }

        public Brush Fill
        {
            get
            {
                SolidColorBrush fill = new SolidColorBrush();
                fill.Color = Color.FromArgb(255, (byte)R, (byte)G, (byte)B);

                return fill;
            }
        }

        public Rectangle robotAsRectangle
        {
            get{
                Rectangle rbtSquare = new Rectangle();
                rbtSquare.Width = width ;
                rbtSquare.Height = height;
                rbtSquare.Fill = Fill;
                Canvas.SetLeft(rbtSquare, cog_x - width / 2);
                Canvas.SetTop(rbtSquare, heightOfRR - World.sizeOfNode - (cog_y - height / 2));
                return rbtSquare;
            }
        }
    }
}
